These attributes are accessed through sysfs. The diagnostic interface will provide access to the controller for bringing up the hardware and testing.
The following table shows the attributes.
Name | Description | Access
|
mode | Returns the current mode: 0 for device mode, 1 for host mode | Read
|
hnpcapable | Gets or sets the "HNP-capable" bit in the Core USB Configuraton Register. Read returns the current value. | Read/Write
|
srpcapable | Gets or sets the "SRP-capable" bit in the Core USB Configuraton Register. Read returns the current value. | Read/Write
|
hsic_connect | Gets or sets the "HSIC-Connect" bit in the GLPMCFG Register. Read returns the current value. | Read/Write
|
inv_sel_hsic | Gets or sets the "Invert Select HSIC" bit in the GLPMFG Register. Read returns the current value. | Read/Write
|
hnp | Initiates the Host Negotiation Protocol. Read returns the status. | Read/Write
|
srp | Initiates the Session Request Protocol. Read returns the status. | Read/Write
|
buspower | Gets or sets the Power State of the bus (0 - Off or 1 - On) | Read/Write
|
bussuspend | Suspends the USB bus. | Read/Write
|
busconnected | Gets the connection status of the bus | Read
|
gotgctl | Gets or sets the Core Control Status Register. | Read/Write
|
gusbcfg | Gets or sets the Core USB Configuration Register | Read/Write
|
grxfsiz | Gets or sets the Receive FIFO Size Register | Read/Write
|
gnptxfsiz | Gets or sets the non-periodic Transmit Size Register | Read/Write
|
gpvndctl | Gets or sets the PHY Vendor Control Register | Read/Write
|
ggpio | Gets the value in the lower 16-bits of the General Purpose IO Register or sets the upper 16 bits. | Read/Write
|
guid | Gets or sets the value of the User ID Register | Read/Write
|
gsnpsid | Gets the value of the Synopsys ID Regester | Read
|
devspeed | Gets or sets the device speed setting in the DCFG register | Read/Write
|
enumspeed | Gets the device enumeration Speed. | Read
|
hptxfsiz | Gets the value of the Host Periodic Transmit FIFO | Read
|
hprt0 | Gets or sets the value in the Host Port Control and Status Register | Read/Write
|
regoffset | Sets the register offset for the next Register Access | Read/Write
|
regvalue | Gets or sets the value of the register at the offset in the regoffset attribute. | Read/Write
|
remote_wakeup | On read, shows the status of Remote Wakeup. On write, initiates a remote wakeup of the host. When bit 0 is 1 and Remote Wakeup is enabled, the Remote Wakeup signalling bit in the Device Control Register is set for 1 milli-second. | Read/Write
|
regdump | Dumps the contents of core registers. | Read
|
spramdump | Dumps the contents of core registers. | Read
|
hcddump | Dumps the current HCD state. | Read
|
hcd_frrem | Shows the average value of the Frame Remaining field in the Host Frame Number/Frame Remaining register when an SOF interrupt occurs. This can be used to determine the average interrupt latency. Also shows the average Frame Remaining value for start_transfer and the "a" and "b" sample points. The "a" and "b" sample points may be used during debugging bto determine how long it takes to execute a section of the HCD code. | Read
|
rd_reg_test | Displays the time required to read the GNPTXFSIZ register many times (the output shows the number of times the register is read). | Read
|
wr_reg_test | Displays the time required to write the GNPTXFSIZ register many times (the output shows the number of times the register is written). | Read
|
lpm_response | Gets or sets lpm_response mode. Applicable only in device mode. | Write
|
sleep_local_dev | Generetates sleep signaling. Applicable only in host mode. | Write
|
sleep_status | Shows sleep status of device. | Read
|
Example usage: To get the current mode: cat /sys/devices/lm0/mode
To power down the USB: echo 0 > /sys/devices/lm0/buspower